export default {
  namespaced: true, // 启用命名空间
  state: {
    lFwdPump: true, //左前泵状态
    lAftPump: true, //左后泵状态
    cLeftPump: true, //中左泵状态
    cRightPump: true, //中右泵状态
    rFwdPump: true, //右前泵状态
    rAftPump: true, //右后泵状态
    fwdCrossValve: true, //前交输活门状态
    aftCrossValve: true //后交输活门状态
  },
  mutations: {
    setLFwdPump: (state) => (state.lFwdPump = !state.lFwdPump),
    setLAftPump: (state) => (state.lAftPump = !state.lAftPump),
    setcRightPump: (state) => (state.cRightPump = !state.cRightPump),
    setcLeftPump: (state) => (state.cLeftPump = !state.cLeftPump),
    setRFwdPump: (state) => (state.rFwdPump = !state.rFwdPump),
    setRAftPump: (state) => (state.rAftPump = !state.rAftPump),
    setFwdCrossPump: (state) => (state.fwdCrossValve = !state.fwdCrossValve),
    setAftCrossPump: (state) => (state.aftCrossValve = !state.aftCrossValve)
  },
  actions: {
    setLFwdPump({ commit }) {
      commit('setLFwdPump')
    },
    setLAftPump({ commit }) {
      commit('setLAftPump')
    },
    setcRightPump({ commit }) {
      commit('setcRightPump')
    },
    setcLeftPump({ commit }) {
      commit('setcLeftPump')
    },
    setRFwdPump({ commit }) {
      commit('setRFwdPump')
    },
    setRAftPump({ commit }) {
      commit('setRAftPump')
    },
    setFwdCrossPump({ commit }) {
      commit('setFwdCrossPump')
    },
    setAftCrossPump({ commit }) {
      commit('setAftCrossPump')
    }
  },
  getters: {
    lFwdPump: (state) => state.lFwdPump,
    lAftPump: (state) => state.lAftPump,
    cLeftPump: (state) => state.cLeftPump,
    cRightPump: (state) => state.cRightPump,
    rAftPump: (state) => state.rAftPump,
    rFwdPump: (state) => state.rFwdPump,
    fwdCrossValve: (state) => state.fwdCrossValve,
    aftCrossValve: (state) => state.aftCrossValve
  }
}
